<?php
/**
 * 描述
 * Created by Paco
 * Date: 2018/8/15 Time: 11:01
 */

namespace App\Models\Auth;


use Illuminate\Database\Eloquent\Model;

class Admin extends Model
{
    protected $table = 'admin';
    protected $primaryKey = 'admin_id';
    protected $hidden = ['password', 'remember_token'];
    protected $fillable = [
        'tel',
        'name',
        'password',
        'remember_token',
        'is_del',
        'login_ip',
        'status',
        'supper',
        'avartar'
    ];

    public function roles()
    {
        return $this->belongsToMany('App\Models\Auth\Role',
            'admin_role',
            'admin_id',
            'role_id'
        );
    }

}